import { getBannerAPI} from '@/apis/home'
import {  ref,onMounted } from 'vue'

export function useBanner () {

  const bannerList = ref([])
  const bannerAPI = async () => {
  const res = await getBannerAPI(2)

  bannerList.value = res.result
  // console.log(bannerList)
  }
  onMounted(() => {
    bannerAPI()
  })

  return {
    bannerList
  }
}
